package com.wxx.db;

import org.apache.ibatis.session.SqlSession;

public abstract class MapperDbManager {
    public static  <T> void addMapper(Class<T> type) {
        DBManager.configuration.addMapper(type);
    }

    protected static  <T> T getMapper(Class<T> type) {
        SqlSession session = DBManager.sqlSessionFactory.openSession(true);
        return session.getMapper(type);
    }
}
